package mtt.us.domain;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * @author   hyphen
 */
@Entity
@Table(name="stundenplan")
public class Stundenplan {
	
	/**
	 * @uml.property  name="id"
	 */
	private int id;
	
	private Matrikel matrikel;
	
	/**
	 * @uml.property  name="name"
	 */
	private String name;
	
	/**
	 * @uml.property  name="listTermine"
	 */
	private List<Termin> listTermine;

	/**
	 * @return
	 * @uml.property  name="name"
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 * @uml.property  name="name"
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return
	 * @uml.property  name="id"
	 */
	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}

	/**
	 * @param id
	 * @uml.property  name="id"
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @return
	 * @uml.property  name="matrikel"
	 */
	@ManyToOne
	@JoinColumn(name="matrikel_id")
	public Matrikel getMatrikel() {
		return matrikel;
	}

	/**
	 * @param matrikel
	 * @uml.property  name="matrikel"
	 */
	public void setMatrikel(Matrikel matrikel) {
		this.matrikel = matrikel;
	}

	/**
	 * @return
	 * @uml.property  name="listTermine"
	 */
	@OneToMany
	@JoinColumn(name="stundenplan_id")
	public List<Termin> getListTermine() {
		return listTermine;
	}

	/**
	 * @param listTermine
	 * @uml.property  name="listTermine"
	 */
	public void setListTermine(List<Termin> listTermine) {
		this.listTermine = listTermine;
	}

}
